package testing.control;

import java.awt.Container;
import java.awt.event.KeyEvent;

import utilities.control.enums.KeyEventType;
import utilities.control.keyboard.Keyboard;

public class TestKeyboardControl extends Keyboard 
{
	public TestKeyboardControl(Container keyboardUser)
	{
		super(1, 1, 1, keyboardUser);
	}

	@Override
	public void onKeyEvent(KeyEventType t, KeyEvent e) 
	{
		String event = null;

		if(KeyEventType.KEY_TYPED_EVENT.equals(t))
			event = "Key Typed";
		else if(KeyEventType.KEY_PRESSED_EVENT.equals(t))
			event = "Key Pressed";
		else if(KeyEventType.KEY_RELEASED_EVENT.equals(t))
			event = "Key Released";
		
		System.out.println(event + ": " + e.getKeyChar());
	}
}
